home *** CD-ROM | disk | FTP | other *** search
- DS (Directory Size) - Written by Aaron Bredon.
- Created using TURBO C, Copyright (C) Borland 1987,1988
-
- Version 4.5 - April 8, 1990
-
- *** NOTE *** - The SOURCE CODE and EXECUTABLE program are PUBLIC DOMAIN.
-
- This Directory size program written in Turbo C 2.0 is very versatile.
- It includes a good usage report (DS ? or any invalid option).
-
- Occasionally the reported space used will not correspond to CHKDSK's report
- (The total of Hidden, Directories, and Regular filesin CHKDSK).
- This is because a directory had enough files deleted to
- reduce the number of sectors it COULD occupy (if compressed)
- if anyone can find a simple way to regain the clusters, has any questions,
- or can give me any suggestions on how to improve this program,
- PLEASE call or write me.
-
- My phone number is (609)924-5976,
- and my address is:
- Aaron Bredon
- 521 State Rd.
- Princeton, NJ 08540
-
-
-
- Syntax: DS [options] [pathnames]
- DS ?
-
- DS ? will give a usage screen with options listed.
- wildcards are allowed in pathnames and are used as file match masks.
- currently, up to 10 pathnames are allowed.
- The program provides one output per path.
- if no path is specified, DS uses the current directory.
-
- Options: Default
- -a show all files (OFF)
- This option, when on, will display all files
- meeting the pathname mask in all directories
- searched.
- -b show attribute instead of time (OFF)
- This option, when on, will display file attributes
- in place of the Hour:minute Time
- (only applicable with -a, -s, or -x)
- -c show # of clusters used by file (OFF)
- This option, when on, will display file sizes
- by number of clusters used, not by bytes used.
- (only applicable with -a, -s, or -x)
- -d split screen display (2 columns) (OFF)
- This option will display files in two columns.
- (only applicable with -a, -s, or -x)
- -f base on file size, not clusters used (OFF)
- This option means totals will be based on
- the sum of the file sizes in bytes, not disk
- space actually used.
- -h count hidden & system files (ON)
- This option means files with the hidden and system
- attributes will be displayed and counted in totals.
- -i include subdirectory space (ON)
- This option will calculate subdirectory size based
- on the number of files in the directory.
- (If a lot of files have been deleted, the subdirectory
- may actually take more space than this, but it is
- usually fairly accurate)
- -lxxxx Force clusters to be xxxx bytes. (actual)
- 0 = use actual size.
- This option can be used to calculate how much space
- a group of files will take on a disk with different
- sized clusters(e.g. a floppy disk).
- -n show full path (OFF)
- This option will display two columns. the left column
- will show the full pathname, while the right will
- show the filename and information.
- (only applicable with -a, -s, or -x)
- -o show path & size ONLY (OFF)
- This option will display files as in the older versions
- of this program: the size followed by the path.
- This is useful to get the path and still fit
- files in two columns with -d, or if the full
- pathname is more than 40 characters long.
- -p paged listing (OFF)
- This option will pause at the end of each screen
- and ask you to hit a key.
- -qxx set lines between pauses to xx. (25)
- This option is useful on non-EGA/VGA screens with
- more than 25 lines/page.
- -r recurse through subdirectories (ON)
- This option(normally ON) is useful when you only want
- to calculate the size of files in one directory,
- NOT including subdirectories.
- -s show subdirectories (OFF)
- This option is useful in figuring out how much space
- is used by each of your subdirectories.
- (especially with the -n or -o options)
- -x info on current directory only (OFF) (eXtended DIR)
- This option acts like the DIR command, except
- that subdirectory sizes are calculated by recursion,
- and displayed as well.
- (this option turns on the -a option as well)
- ( the effects of the -a and -s options are changed
- by this option)
- -z show total size (ON)
- This option controls whether the summary information
- on the total size of the files found is displayed.
-
- Some possible uses: Command
-
- 1. Find out the size of a directory DSIZE path
- 2. DIRectory including subdirectory sizes DSIZE -x -d -p -i path
- (paged, 2 column)
- 3. Show all files on disk DSIZE -a drive:\
- 4. Show all directories on disk DSIZE -s drive:\
- 5. Find a file anywhere on disk DSIZE -a drive:\fname
- 6. Find out how much space the contents
- of a directory would take on a floppy. DSIZE -l1024 path
-
- Recommendations:
- 1. Make a batch file XD.BAT (eXtended Directory)
- that calls DS with the following options: -x -d -p -i
- 2. Make a batch file FF.BAT (Find File)
- that calls DS with the following options: -a c:\%1
-